package com.rise.remi.player;

import com.rise.remi.core.Global;
import java.io.IOException;
import javax.imageio.ImageIO;

/**
 *
 * @author remi
 */
public class Player extends Entity {

    public Player(String name, String sprite_path) {
        this.setPaint(true);
        this.setName(name);
        this.setX(Global.paintWidth / 2);
        this.setY(Global.paintHeight / 2);
        try {
            this.setSprite(ImageIO.read(getClass().getResourceAsStream(sprite_path)));
        } catch (IOException ex) {
            System.out.println("Error while loading hero sprite");
        }
    }
}
